::WS::Utils::ServiceTypeDef Client FreshBookApi EstimateLine {
    name           {type string minOccurs 0 maxOccurs 1}
    description    {type string minOccurs 0 maxOccurs 1}
    unit_cost      {type string minOccurs 0 maxOccurs 1}
    quantity       {type string minOccurs 0 maxOccurs 1}
    tax1_name      {type string minOccurs 0 maxOccurs 1}
    tax2_name>     {type string minOccurs 0 maxOccurs 1}
    tax1_percent   {type float minOccurs 0 maxOccurs 1}
    tax2_percent   {type float minOccurs 0 maxOccurs 1}
    type           {type string minOccurs 0 maxOccurs 1}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi EstimateLineArray {
    line    {type EstimateLine()}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi EstimateDefinition {
    client_id       {type string minOccurs 0 maxOccurs 1}
    status          {type string minOccurs 0 maxOccurs 1}
    date            {type string minOccurs 0 maxOccurs 1}
    po_number       {type string minOccurs 0 maxOccurs 1}
    discount        {type string minOccurs 0 maxOccurs 1}
    currency_code   {type string minOccurs 0 maxOccurs 1}
    language        {type string minOccurs 0 maxOccurs 1}
    notes           {type string minOccurs 0 maxOccurs 1}
    terms           {type string minOccurs 0 maxOccurs 1}
    first_name      {type string minOccurs 0 maxOccurs 1}
    last_name       {type string minOccurs 0 maxOccurs 1}
    organization    {type string minOccurs 0 maxOccurs 1}
    p_street1       {type string minOccurs 0 maxOccurs 1}
    p_street2       {type string minOccurs 0 maxOccurs 1}
    p_city          {type string minOccurs 0 maxOccurs 1}
    p_state         {type string minOccurs 0 maxOccurs 1}
    p_country       {type string minOccurs 0 maxOccurs 1}
    p_code          {type string minOccurs 0 maxOccurs 1}
    vat_name        {type string minOccurs 0 maxOccurs 1}
    vat_number      {type string minOccurs 0 maxOccurs 1}
    lines           {type EstimateLineArray}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi EstimateUpdate {
    estimate_id     {type string minOccurs 1 maxOccurs 1}
    client_id       {type string minOccurs 0 maxOccurs 1}
    status          {type string minOccurs 0 maxOccurs 1}
    date            {type string minOccurs 0 maxOccurs 1}
    po_number       {type string minOccurs 0 maxOccurs 1}
    discount        {type string minOccurs 0 maxOccurs 1}
    currency_code   {type string minOccurs 0 maxOccurs 1}
    language        {type string minOccurs 0 maxOccurs 1}
    notes           {type string minOccurs 0 maxOccurs 1}
    terms           {type string minOccurs 0 maxOccurs 1}
    first_name      {type string minOccurs 0 maxOccurs 1}
    last_name       {type string minOccurs 0 maxOccurs 1}
    organization    {type string minOccurs 0 maxOccurs 1}
    p_street1       {type string minOccurs 0 maxOccurs 1}
    p_street2       {type string minOccurs 0 maxOccurs 1}
    p_city          {type string minOccurs 0 maxOccurs 1}
    p_state         {type string minOccurs 0 maxOccurs 1}
    p_country       {type string minOccurs 0 maxOccurs 1}
    p_code          {type string minOccurs 0 maxOccurs 1}
    vat_name        {type string minOccurs 0 maxOccurs 1}
    vat_number      {type string minOccurs 0 maxOccurs 1}
    lines           {type EstimateLineArray}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi EstimateDetail {
    estimate_id     {type string minOccurs 1 maxOccurs 1}
    number          {type string minOccurs 0 maxOccurs 1}
    client_id       {type string minOccurs 0 maxOccurs 1}
    organization    {type string minOccurs 0 maxOccurs 1}
    first_name      {type string minOccurs 0 maxOccurs 1}
    last_name       {type string minOccurs 0 maxOccurs 1}
    p_street1       {type string minOccurs 0 maxOccurs 1}
    p_street2       {type string minOccurs 0 maxOccurs 1}
    p_city          {type string minOccurs 0 maxOccurs 1}
    p_state         {type string minOccurs 0 maxOccurs 1}
    p_country       {type string minOccurs 0 maxOccurs 1}
    p_code          {type string minOccurs 0 maxOccurs 1}
    vat_name        {type string minOccurs 0 maxOccurs 1}
    vat_number      {type string minOccurs 0 maxOccurs 1}
    po_number       {type string minOccurs 0 maxOccurs 1}
    folder          {type string minOccurs 0 maxOccurs 1}
    status          {type string minOccurs 0 maxOccurs 1}
    amount          {type string minOccurs 0 maxOccurs 1}
    currency_code   {type string minOccurs 0 maxOccurs 1}
    language        {type string minOccurs 0 maxOccurs 1}
    date            {type string minOccurs 0 maxOccurs 1}
    notes           {type string minOccurs 0 maxOccurs 1}
    terms           {type string minOccurs 0 maxOccurs 1}
    discount        {type string minOccurs 0 maxOccurs 1}
    url             {type string minOccurs 0 maxOccurs 1}
    auth_url        {type string minOccurs 0 maxOccurs 1}
    links           {type EstimateLink minOccurs 0 maxOccurs 1}
    lines           {type EstimateLineArray}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi EstimateLink {
    client_view {type string minOccurs 0 maxOccurs 1}
    view        {type string minOccurs 0 maxOccurs 1}
}

::WS::Utils::ServiceTypeDef Client FreshBookApi EstimateDetailArray {
    estimate    {type EstimateDetail()}
}


::WS::Client::DefineRestMethod FreshBookApi estimate estimate.create {
    estimate    {type EstimateDefinition}
} {
    estimate_id {type string}
}

::WS::Client::DefineRestMethod FreshBookApi estimate estimate.update {
    estimate    {type EstimateUpdate}
} {}

::WS::Client::DefineRestMethod FreshBookApi estimate estimate.get {
    estimate_id {type string}
} {
    estimate    {type EstimateDetail}
}

::WS::Client::DefineRestMethod FreshBookApi estimate estimate.delete {
    estimate_id {type string}
} {}

::WS::Client::DefineRestMethod FreshBookApi estimate estimate.list {
    client_id   {type string minOccurs 0 maxOccurs 1}
    date_from   {type string minOccurs 0 maxOccurs 1}
    date_to     {type string minOccurs 0 maxOccurs 1}
    page        {type integer minOccurs 0 maxOccurs 1}
    per_page    {type integer minOccurs 0 maxOccurs 1}
    folder      {type integer minOccurs 0 maxOccurs 1}
} {
    estimates    {type EstimateDetailArray}
}

::WS::Client::DefineRestMethod FreshBookApi estimate estimate.sendByEmail {
    estimate_id {type string}
} {
}
